package com.ruoyi.tjbb.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.tjbb.mapper.SysTjbbDdjlMapper;
import com.ruoyi.tjbb.domain.SysTjbbDdjl;
import com.ruoyi.tjbb.service.ISysTjbbDdjlService;

/**
 * 调度记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-09-26
 */
@Service
public class SysTjbbDdjlServiceImpl implements ISysTjbbDdjlService 
{
    @Autowired
    private SysTjbbDdjlMapper sysTjbbDdjlMapper;

    /**
     * 查询调度记录
     * 
     * @param id 调度记录主键
     * @return 调度记录
     */
    @Override
    public SysTjbbDdjl selectSysTjbbDdjlById(Long id)
    {
        return sysTjbbDdjlMapper.selectSysTjbbDdjlById(id);
    }

    /**
     * 查询调度记录列表
     * 
     * @param sysTjbbDdjl 调度记录
     * @return 调度记录
     */
    @Override
    public List<SysTjbbDdjl> selectSysTjbbDdjlList(SysTjbbDdjl sysTjbbDdjl)
    {
        return sysTjbbDdjlMapper.selectSysTjbbDdjlList(sysTjbbDdjl);
    }

    /**
     * 新增调度记录
     * 
     * @param sysTjbbDdjl 调度记录
     * @return 结果
     */
    @Override
    public int insertSysTjbbDdjl(SysTjbbDdjl sysTjbbDdjl)
    {
        sysTjbbDdjl.setCreateTime(DateUtils.getNowDate());
        return sysTjbbDdjlMapper.insertSysTjbbDdjl(sysTjbbDdjl);
    }

    /**
     * 修改调度记录
     * 
     * @param sysTjbbDdjl 调度记录
     * @return 结果
     */
    @Override
    public int updateSysTjbbDdjl(SysTjbbDdjl sysTjbbDdjl)
    {
        sysTjbbDdjl.setUpdateTime(DateUtils.getNowDate());
        return sysTjbbDdjlMapper.updateSysTjbbDdjl(sysTjbbDdjl);
    }

    /**
     * 批量删除调度记录
     * 
     * @param ids 需要删除的调度记录主键
     * @return 结果
     */
    @Override
    public int deleteSysTjbbDdjlByIds(Long[] ids)
    {
        return sysTjbbDdjlMapper.deleteSysTjbbDdjlByIds(ids);
    }

    /**
     * 删除调度记录信息
     * 
     * @param id 调度记录主键
     * @return 结果
     */
    @Override
    public int deleteSysTjbbDdjlById(Long id)
    {
        return sysTjbbDdjlMapper.deleteSysTjbbDdjlById(id);
    }
}
